local sk__yongji = fk.CreateSkill {

  name = "sk__yongji",

  tags = { Skill.Compulsory, },

}



sk__yongji:addEffect(fk.Damage, {
  name = "sk__yongji",
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(sk__yongji.name) and data.card and data.card.trueName == "slash" and player.phase == Player.Play
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local e = room.logic:getCurrentEvent():findParent(GameEvent.UseCard)
    if e then
      if e.data.from == player and e.data.card.trueName == "slash" and not e.data.extraUse then
        player:addCardUseHistory("slash", -1)
        e.data.extraUse = true
      end
    end
    if player:isWounded() then
      player:drawCards(math.min(player:getLostHp(), 3), sk__yongji.name)
    end
  end,
})

return sk__yongji